import { http } from '@/utils'

import type { QRCodeReq } from './model/qrcode'

/**
 * 获取小程序码
 * @param data
 * @returns {Request<string>}
 */
export function getWxMiniCode(data: QRCodeReq) {
  return http.post<string>('/paas/paasminiprogramuser/getWxMiniCode', data)
}

/**
 * 根据id从服务端获取携带参数
 * @param scene
 * @returns {Request<string>}
 */
export function getWxMiniCodeScene(scene: string | number) {
  return http.get<string>('/paas/paasminiprogramuser/getWxMiniCodeScene', {
    scene
  })
}
